test(a11y): add axe-core WCAG A/AA scans to accessibility suite#586
Conversation
Add @axe-core/playwright and two advisory scans in ui-accessibility.spec.ts: a default-colors desktop scan and a forced-colors mobile scan (color-contrast rule disabled under forced colors; contrast asserted by the default scan). Scans run only after the existing usability gates so hydration double-render cannot produce false positives, fail only on critical/serious impact, and attach the full violation list for triage. Untagged, so they run in the advisory e2e lane only. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe UI accessibility suite now integrates axe-core Playwright scans for default and forced-colors modes, attaches scan results to reports, and fails on serious or critical WCAG violations. ChangesAccessibility scan coverage
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant PlaywrightTest
participant Dashboard
participant AxeBuilder
participant TestInfo
PlaywrightTest->>Dashboard: verify dashboard is usable
PlaywrightTest->>AxeBuilder: run WCAG scan
AxeBuilder-->>PlaywrightTest: return violations
PlaywrightTest->>TestInfo: attach JSON results
PlaywrightTest->>PlaywrightTest: fail on serious or critical violations
🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
Summary
@axe-core/playwright(MIT/MPL-2.0, dev-only) and two automated WCAG A/AA scans totests/ui-accessibility.spec.ts, turningtest:e2e:accessibilityfrom manual role/aria assertions into real axe coverage.color-contrast(forced-colors palettes invalidate it).critical/seriousimpact violations and attach the full violation JSON to the test report for triage of lower-impact findings.expectDashboardUsablereadiness gate so the hydration double-render cannot produce false positives, and are untagged so they stay in the advisory e2e lane (no new required checks).Verification
npm run test:e2e:accessibility— 5/5 passed twice consecutively (3 existing + 2 new scans); zero blocking violations found on the dashboard shell.npm run verify:cheap— green (1948 unit tests, lint, typecheck, runtime/pin/sitemap checks).npm run format— clean.Notes
🤖 Generated with Claude Code